
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
	enum ball
	{
		red,
		yellow,
		blue,
		white,
		black
	};
	
	ball b1, b2, b3,b;
	int count = 0;
	for (int i = 0; i < 5; i++)
	{
		b1 = (ball)i;
		for (int j = 0; j < 5; j++)
		{
			b2 = (ball)j;
			if (b2 == b1)
			{
				continue;
			}
			else
			{
				for (int k = 0; k < 5; k++)
				{
					b3 = (ball)k;
					if (b3 == b2 || b3 == b1)
					{
						continue;
					}
					else
					{
						count++;
						cout << count << ":";
						for (int loop = 1; loop < 4; loop++)
						{
							switch (loop)
							{
							case 1:b = b1; break;
							case 2:b = b2; break;
							case 3:b = b3; break;
							default:break;
							}
							switch (b)
							{
							case red:cout << setw(8) << "red"; break;
							case yellow:cout << setw(8) << "yellow"; break;
							case blue:cout << setw(8) << "blue"; break;
							case white:cout << setw(8) << "white"; break;
							case black:cout << setw(8) << "black"; break;
							default:break;
							}
						}
						cout << endl;
						//cout << count << ":" << b1 << " " << b2 << " " << b3 << endl;
					}
				}
			}
		}
	}
	cout << "total:" << count << endl;
	return 0;
}